package top.fengleifeng.question;

/**
 * @program: leetcode-test
 * @description:
 * @author: fengleifeng
 * @create: 2020-09-30 16:56
 **/
public class Num836矩形重叠 {

    class Solution {
        public boolean isRectangleOverlap(int[] rec1, int[] rec2) {
            return !(rec1[2] <= rec2[0] ||   // left
                    rec1[3] <= rec2[1] ||   // bottom
                    rec1[0] >= rec2[2] ||   // right
                    rec1[1] >= rec2[3]);    // top
        }
    }
}
